<template>
  <div class="btn">
    <el-button type="success" @click="goLogin">您好！请前往注册...</el-button>
  </div>
</template>
<script lang="ts">
import { useRouter} from "vue-router";
import { getCurrentInstance } from "vue";
import { ElMessage } from 'element-plus'
export default {

  setup() {
    console.log(getCurrentInstance());
    
    //路由跳转
    const  router = useRouter() 
      // @ts-ignore
    const { ctx } = getCurrentInstance();
    const goLogin = ()=>{
    router.push('./login')
      ElMessage.success('欢迎小姐姐')
    }
    return { goLogin }
  },
};
</script>
<style scoped>
</style>